\begin{tabular}{|lr|l|l|l|l|l|l|l|l|l|} \cline{3-10}
\multicolumn{1}{l}{} && \multicolumn{8}{c|}{To} \\ \cline{3-10}
\multicolumn{1}{l}{} & & A & B & C & D & E & F & G & H \\ \hline
\multirow{8}{*}{\begin{sideways}From\end{sideways}}
%                           A   B   C   D   E   F   G   H
& \multicolumn{1}{|r|}{A} &   &   &   &   &   &   &   &   \\ \cline{2-10}
& \multicolumn{1}{|r|}{B} &   &   &   &   &   &   &   &   \\ \cline{2-10}
& \multicolumn{1}{|r|}{C} &   &   &   &   &   &   &   &   \\ \cline{2-10}
& \multicolumn{1}{|r|}{D} &   &   &   &   &   &   &   &   \\ \cline{2-10}
& \multicolumn{1}{|r|}{E} &   &   &   &   &   &   &   &   \\ \cline{2-10}
& \multicolumn{1}{|r|}{F} &   &   &   &   &   &   &   &   \\ \cline{2-10}
& \multicolumn{1}{|r|}{G} &   &   &   &   &   &   &   &   \\ \cline{2-10}
& \multicolumn{1}{|r|}{H} &   &   &   &   &   &   &   &   \\ \hline
\end{tabular}